package com.yml.ktbus.logger

import java.util.logging.Level

/**
 * Created by liaohailiang on 2019-11-07.
 */
class LoggerManager(var logger: Logger) : Logger {
    var isEnable = true
    override fun log(level: Level?, msg: String?) {
        if (isEnable) {
            logger.log(level, msg)
        }
    }

    override fun log(level: Level?, msg: String?, th: Throwable?) {
        if (isEnable) {
            logger.log(level, msg, th)
        }
    }
}